package com.yanqu.road.server.timer.newmonopolymarket;

import com.yanqu.road.server.manger.systemgroup.newmonopolymarket.NewMonopolyMarketMgr;
import com.yanqu.road.utils.executor.GeneralTask;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class NewMonopolyMarketTask extends GeneralTask {

    protected Logger logger = LogManager.getLogger(NewMonopolyMarketTask.class.getName());

    @Override
    public void doRun() {

        try{
            NewMonopolyMarketMgr.fetchWeekStateData();
        }catch (Exception e){
            NewMonopolyMarketMgr.getLogger().info("error:", e);
        }

        try{
            // 同步榷场玩家 和派遣门客的数据
            NewMonopolyMarketMgr.uploadUserInfo();
            NewMonopolyMarketMgr.uploadObjectInfo();
        }catch (Exception e){
            NewMonopolyMarketMgr.getLogger().info("error:", e);
        }

    }
}
